home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / gnu / gnumake / pdmake.zoo / readme < prev    next >
Text File  |  1991-09-25  |  6KB  |  194 lines

  1.  
  2.     A full featured Public Domain Make for the Atari Sts. Adapted 
  3. from origonal posting by Neil Russell.
  4.  
  5.     After unsharing the 3 parts of this posting you should end up
  6. with the following files:
  7.  
  8. Sources:
  9.  
  10.     astat.h        h.h        main.c        rules.c
  11.     check.c        input.c        make.c        ststuff.c
  12.     decl.h        macro.c        reader.c    touch.c
  13.  
  14. Alcyon C compile scripts (you only need these the first time around!):
  15.     compile.sh
  16.     link.sh
  17.     lnk
  18.  
  19. Megamax C compiler scripts (you only need these the first time around!):
  20.     mmcomp.sh
  21.     mmlink.sh
  22.  
  23. Makefiles for make:
  24.     makefile  - Alcyon C flavor
  25.     makefile.mmc - Megamax C flavor
  26.  
  27. Touch:
  28.     compiling & linking touch.c will reult in a touch program. touch
  29.     updates the mod. time of a file to present.
  30.     Usage: touch file file ......
  31.  
  32.     #define the symbol MEGAMAX at the top of touch.c is you are
  33. going to compile touch using the Megamax C compiler.
  34.  
  35. Docs: (well sort of)
  36.     readme
  37.     read.mee
  38.  
  39.  
  40.     Atari ST specific Information:
  41.  
  42.     ATARI SPECIAL MACROS:
  43.  
  44.     Since the Atari St does not have any standard shell, I have built in
  45. three macros that are useful:
  46.  
  47.     $(RM)    - removes one or more files, Wild Cards Allowed
  48.     $(CP)   - copies one file to another. NO directories allowed,
  49.           will only accept two arguments, both of which
  50.           must be files. If the destination file exists, it
  51.               will be overwritten.
  52.     $(ECHO) - echo's its arguements.
  53.  
  54.     All atari special commands internally begin with the character '%'
  55.     and are handled by routines in ststuff.c. It should be trivial to
  56.     add other Atari Special commands if you so desire. All other 
  57.     commands are executed using the Pexec gemdos command, so complete
  58.     path names must be used.
  59.  
  60.     CONTINUATION LINES:
  61.  
  62.     The line continuation character is '\'. Back slashes may appear in
  63. pathname, but NOT at the end of a line, as it will be taken as a continuation
  64. backslash, and not as a part of the pathname. This should not create any big
  65. problem as far as i can see.
  66.  
  67.  
  68.     DEFAULT RULES:
  69.  
  70.     See the file RULES.C. I have built in default rules for '.c.o'
  71. for both Alcyon C and Megamax C. But since both use the same '.o' suffix,
  72. only one may be built into the version of make that you compile. Which
  73. version gets built into make depends on the Pre Processor symbol
  74. 'MEGRULES'. If this symbol is defined (see H.H) then Megamax rules get
  75. built in. If it is not, then Alcyon rules get built in. All the rules
  76. are based on values of macros defined in RULES.C. These macros may be
  77. redefined in a makefile, and when the default rule is expanded by make
  78. at runtime, the new redefined values will be used instead. Note that the default
  79. rule may not be redefined in a makefile. Make will give an error. The only
  80. way to redefine the default rule is to edit RULES.C and recompile and link.
  81. The values i have used in RULES.C are relevant for our setup. You will
  82. probably want to edit them for your setup. The default rules in RULES.C are
  83. as follows:
  84.  
  85.     .SUFFIXES: .prg .68k .o .bin .s .c .pas
  86.  
  87.     Alcyon C defult rules (if MEGRULES is not defined):
  88.     /* Alcyon C and AS68 rules */
  89.  
  90.     /* Path to the Alcyon C executables */
  91.     setmacro("CPATH","c:\\bin");
  92.  
  93.     /* C preprocessor       */
  94.     setmacro("CP68", "cp68.prg");
  95.     /* C preprocessor flags    */
  96.     setmacro("CPFLAGS", "-i c:\\include\\");
  97.  
  98.     /* Pass 1 of the C compiler */
  99.     setmacro("C068", "c068.prg");
  100.     /* Pass 1 flags           */
  101.     setmacro("C0FLAGS", "-f"); /* change to "" if you want to use IEEE
  102.                     * floating point and libm instead of libf
  103.                     * by Default. Otherwise simply redefine
  104.                     * C0FLAGS in your makefile to get the
  105.                     * IEEE floating option.
  106.                     */
  107.  
  108.     /* Pass 2 of the C compiler */
  109.     setmacro("C168","c168.prg");
  110.     /* Pass 2  flags        */
  111.     /* setmacro("C1FLAGS", ""); */    /* Save ourselves some space */
  112.  
  113.     /* Assembler            */
  114.     setmacro("AS","as68.prg");
  115.     /* Assembler flags        */
  116.     setmacro("ASFLAGS","-l -u -s c:\\bin\\");
  117.  
  118.     .c.o:
  119.         $(CPATH)\$(CP68) $(CPFLAGS) $< $*.i
  120.         $(CPATH)\$(C068) $*.i $*.1 $*.2 $*.3 $(C0FLAGS)
  121.         $(RM) $*.i
  122.         $(CPATH)\$(C168) $*.1 $*.2 $*.s $(C1FLAGS)
  123.         $(RM) $*.1 $*.2
  124.         $(CPATH)\$(AS) $(ASFLAGS) $*.s
  125.         $(RM) $*.s
  126.  
  127.     .s.o:
  128.         $(CPATH)\$(AS) $(ASFLAGS) $<
  129.  
  130.     /* Linker of choice */
  131.     setmacro("LINKER", "c:\\bin\\link68.prg");
  132.  
  133.     /* Relmod */
  134.     setmacro("RELMOD", "c:\\bin\\relmod.prg");
  135.  
  136.  
  137.      Megamax C default rules (if MEGRULES is defined):
  138.  
  139.     /* Megamax C Rules default */
  140.  
  141.     /* Path to the Megamax C executables */
  142.     setmacro("CPATH","c:\\bin");
  143.  
  144.     /* C Compiler       */
  145.     setmacro("MMCC", "mmcc.ttp");
  146.  
  147.     /* Code Optimizer        */
  148.     setmacro("MMIMP","mmimp.ttp");
  149.  
  150.     .c.o:
  151.         $(CPATH)\$(MMCC) $<
  152.         $(CPATH)\$(MMIMP) $*.o
  153.  
  154.     /* Linker of choice */
  155.     setmacro("LINKER", "$(CPATH)\\mmlink.ttp");
  156.  
  157.     I have not defined any default '.pas.bin' rule for Oss Pascal, but
  158. that should be easy to add.
  159.  
  160.  
  161.     How to Compile Make:
  162.  
  163.     Edit the file H.H. If you want to use the Megamax C compiler 
  164. uncomment the line /* #define MEGAMAX */ to define the symbol 'MEGAMAX'. If
  165. you are using the Alcyon C compiler, leave the line commented out. Edit the 
  166. file RULES.C and the symbol 'MEGRULES' in H.H for your taste. If you have
  167. the beckmeyer C shell and my version of CC (posted to the net long ago) then
  168. you may use the shell scripts
  169.     compile.sh and link.sh - for Alcyon C
  170. or
  171.     mmcomp.sh and mmlink.sh - for Megamax C
  172.  
  173. If you don't have CC or microCshell, then you will have to use these scripts
  174. as guideline.
  175.  
  176.     Once make.prg is made, you can safely throw away all the shell scripts!!
  177. If you intend to use make from the desktop, rename it to make.ttp.
  178.  
  179.     
  180.     This program is fully in the Public Domain, and you are encouraged
  181. to distribute copies of the program. Your comments/criticisms/fixes etc.
  182. will be very much appreciated. I am however  not responsible for any bugs
  183. and/or correctness of behavior of the program. No part of this distribution may
  184. be used for commercial gains.
  185.  
  186.                 Send your comments to:
  187.  
  188.                     Jwahar R. Bammi
  189.                    Usenet:  .....!decvax!cwruecmp!bammi
  190.                     CSnet:  bammi@case
  191.                  Arpa:  bammi%case@csnet-relay
  192.                CompuServe:  71515,155
  193.  
  194.